{extend name="template/base" /}
{block name="style"}
<link href="__LIB__/select2-4.0.3/dist/css/select2.min.css" rel="stylesheet" />
<link rel="stylesheet" href="__LIB__/webuploader/0.1.5/webuploader.css" />
<link rel="stylesheet" href="__LIB__/fontawesome-4.2.0_ie7/4.2.0/css/font-awesome.min.css" />
{/block}
{block name="content"}
<div class="page-container">
    <form class="form form-horizontal" id="form" method="post" action="{:\\think\\Request::instance()->baseUrl()}">
        <input type="hidden" name="id" value="{$vo.id ?? ''}">
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">派车单：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <select name="dispatch_group_id" class="select2"  id="dispatch_group_id">
                    {empty name = "vo['dispatch_group_id']"}
                    <option value="">选择派车单</option>
                    {/empty}
                    {volist name="dispatch_list" id="dispatch"}
                    <option value="{$dispatch['id']}" {if ($vo['dispatch_group_id'] == $dispatch['id'])} selected {/if}>{$dispatch['id']}：{$dispatch['realname']}【{$dispatch['title']}】</option>
                    {/volist}
                </select>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">发票类型：</label>
            <div class="formControls col-xs-6 col-sm-6">
<!--                <input type="text" class="input-text" placeholder="发票类型" name="invoice_type" value="{$vo.invoice_type ?? ''}" >-->
                <select name="invoice_type" class="select" style="height: 31px">
                    <option value="">选择发票类型</option>
                    <option value="过路费" {if ($vo.invoice_type=='过路费')}selected{/if}>过路费</option>
                    <option value="加油费" {if ($vo.invoice_type=='加油费')}selected{/if}>加油费</option>
                    <option value="停车费" {if ($vo.invoice_type=='停车费')}selected{/if}>停车费</option>
                    <option value="洗车费" {if ($vo.invoice_type=='洗车费')}selected{/if}>洗车费</option>
                    <option value="其他" {if ($vo.invoice_type=='其他')}selected{/if}>其他</option>
                </select>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">发票代码：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" placeholder="发票代码" name="invoice_code" value="{$vo.invoice_code ?? ''}" >
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">发票号码：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" placeholder="发票号码" name="invoice_num" value="{$vo.invoice_num ?? ''}" >
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">发票金额：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" placeholder="发票金额" name="invoice_money" value="{$vo.invoice_money ?? ''}" >
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">合计：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" placeholder="合计" name="total" value="{$vo.total ?? ''}" >
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">备注：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <textarea class="textarea" placeholder="备注" name="remark" >{$vo.remark}</textarea>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <button type="submit" class="btn btn-primary radius">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>
                <button type="button" class="btn btn-default radius ml-20" onClick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
    </form>
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="__LIB__/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="__LIB__/webuploader/0.1.5/webuploader.js"></script>
<script type="text/javascript" src="__LIB__/webuploader/0.1.5/image-upload/uploadimg.js"></script>
<!--select2 js 插件-->
<script type="text/javascript" src="__LIB__/select2-4.0.3/dist/js/select2.min.js"></script>
<script>
    $(function () {

        upload_imgs("head_img");

        var id = $("#dispatch_group_id").select2({
            language: "zh-CN", //设置 提示语言
            width: "100%", //设置下拉框的宽度
            theme: "classic"
        });
        {notempty name = "vo['dispatch_group_id']"}
        id.val("{$vo['dispatch_group_id']}").trigger("change");
        {/notempty}


        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });

        $("#form").Validform({
            tiptype: 2,
            ajaxPost: true,
            showAllError: true,
            callback: function (ret){
                ajax_progress(ret);
            }
        });
    })
</script>
{/block}
